<!DOCTYPE html>
<html lang="en-us">
<head>
    <meta charset="UTF-8">
    <title>Grafika</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="../css/normalize.css" media="screen">
    <link rel='stylesheet' type='text/css' href='https://fonts.googleapis.com/css?family=Roboto'>
    <link rel="stylesheet" type="text/css" href="../css/stylesheet.css" media="screen">
</head>
<body>
<button id="sidebar-show" class="sidebar-show"></button>    <div id="content" class="content">
        <h1>QuadraticBezier</h1>

        <p>Creates a quadratic bezier. Quadratic bezier has 1 control point.</p>

        <h5>Parameters</h5>
                    <div class="params">
                
                    <h6>point1</h6>

                    <p>Array of X and Y value for start point.</p>
                
                    <h6>control</h6>

                    <p>Array of X and Y value for control point.</p>
                
                    <h6>point2</h6>

                    <p>Array of X and Y value for end point.</p>
                
                    <h6>color</h6>

                    <p>Color of the curve. Accepts hex string or a Color object. Defaults to black.</p>
                            </div>
        
        <h5>Examples</h5>
        <p>Detect and create based on available editor:</p>
    <pre><code>use Grafika\Grafika;
use Grafika\Gd\DrawingObject\QuadraticBezier as GdQuadraticBezier;
use Grafika\Imagick\DrawingObject\QuadraticBezier as ImagickQuadraticBezier;

//...

$editorName = Grafika::detectAvailableEditor();
if('Imagick'===$editorName){
    $drawingObject = new ImagickQuadraticBezier(array(70, 250), array(20, 110), array(220, 60), '#FF0000');
} else if ('Gd'===$editorName) {
    $drawingObject = new GdQuadraticBezier(array(70, 250), array(20, 110), array(220, 60), '#FF0000');
}
$editor->draw( $image, $drawingObject );
</code></pre>

        <p>Or let Grafika do it automatically using createDrawingObject:</p>
    <pre><code>use Grafika\Grafika;

//...

$drawingObject = Grafika::createDrawingObject('QuadraticBezier', array(70, 250), array(20, 110), array(220, 60), '#FF0000');
$editor->draw( $image, $drawingObject ); // Draw on an image </code></pre>
        <p>The result of the above code:</p>
        <p><img src="../images/testQuadraticBezier.jpg" alt="testQuadraticBezier"></p>
    </div>
<div id="sidebar" class="sidebar">
    <div class="scrollable">
        <ul class="menu">
            <li>Getting Started</li>
            <li>
                <ul>
                    <li><a href="../index.html">What is Grafika?</a></li>
                    <li><a href="../requirements.html">Requirements</a></li>
                    <li><a href="../installation.html">Installation</a></li>
                    <li><a href="../migration1x.html">Migration from 1.x</a></li>
                </ul>
            </li>
            <li>Examples</li>
            <li>
                <ul>
                    <li><a href="../creating-editors.html">Creating Editors</a></li>
                    <li><a href="../creating-images.html">Creating Images</a></li>
                    <li><a href="../resizing.html">Resizing</a></li>
                    <li><a href="../compare-images.html">Compare Images</a></li>
                    <li><a href="../smart-crop.html">Smart Crop</a></li>
                    <li><a href="../animated-gif.html">Animated GIF</a></li>
                </ul>
            </li>
            <li>Editor Functions</li>
            <li>
                <ul>
                    <li><a href="../editor/apply.html">apply</a></li>
                    <li><a href="../editor/blend.html">blend</a></li>
                    <li><a href="../editor/compare.html">compare</a></li>
                    <li><a href="../editor/crop.html">crop</a></li>
                    <li><a href="../editor/draw.html">draw</a></li>
                    <li><a href="../editor/equal.html">equal</a></li>
                    <li><a href="../editor/fill.html">fill</a></li>
                    <li><a href="../editor/flatten.html">flatten</a></li>
                    <li><a href="../editor/flip.html">flip</a></li>
                    <li><a href="../editor/free.html">free</a></li>
                    <li><a href="../editor/isAvailable.html">isAvailable</a></li>
                    <li><a href="../editor/opacity.html">opacity</a></li>
                    <li><a href="../editor/open.html">open</a></li>
                    <li><a href="../editor/resize.html">resize</a></li>
                    <li><a href="../editor/resizeExact.html">resizeExact</a></li>
                    <li><a href="../editor/resizeExactHeight.html">resizeExactHeight</a></li>
                    <li><a href="../editor/resizeExactWidth.html">resizeExactWidth</a></li>
                    <li><a href="../editor/resizeFill.html">resizeFill</a></li>
                    <li><a href="../editor/resizeFit.html">resizeFit</a></li>
                    <li><a href="../editor/rotate.html">rotate</a></li>
                    <li><a href="../editor/save.html">save</a></li>
                    <li><a href="../editor/text.html">text</a></li>
                </ul>
            </li>
            <li>Image Functions</li>
            <li>
                <ul>
                    <li><a href="../image/blob.html">blob</a></li>
                    <li><a href="../image/getCore.html">getCore</a></li>
                    <li><a href="../image/getHeight.html">getHeight</a></li>
                    <li><a href="../image/getImageFile.html">getImageFile</a></li>
                    <li><a href="../image/getType.html">getType</a></li>
                    <li><a href="../image/getWidth.html">getWidth</a></li>
                    <li><a href="../image/isAnimated.html">isAnimated</a></li>
                </ul>
            </li>
            <li>Filters</li>
            <li>
                <ul>
                    <li><a href="../filters/Blur.html">Blur</a></li>
                    <li><a href="../filters/Brightness.html">Brightness</a></li>
                    <li><a href="../filters/Colorize.html">Colorize</a></li>
                    <li><a href="../filters/Contrast.html">Contrast</a></li>
                    <li><a href="../filters/Dither.html">Dither</a></li>
                    <li><a href="../filters/Gamma.html">Gamma</a></li>
                    <li><a href="../filters/Grayscale.html">Grayscale</a></li>
                    <li><a href="../filters/Invert.html">Invert</a></li>
                    <li><a href="../filters/Pixelate.html">Pixelate</a></li>
                    <li><a href="../filters/Sharpen.html">Sharpen</a></li>
                    <li><a href="../filters/Sobel.html">Sobel</a></li>
                </ul>
            </li>
            <li>Drawing Objects</li>
            <li>
                <ul>
                    <li><a href="../draw/CubicBezier.html">CubicBezier</a></li>
                    <li><a href="../draw/Ellipse.html">Ellipse</a></li>
                    <li><a href="../draw/Line.html">Line</a></li>
                    <li><a href="../draw/Polygon.html">Polygon</a></li>
                    <li><a href="../draw/QuadraticBezier.html">QuadraticBezier</a></li>
                    <li><a href="../draw/Rectangle.html">Rectangle</a></li>
                </ul>
            </li>
            <li>Additional Info</li>
            <li>
                <ul>
                    <li><a href="../license.html">License</a></li>
                    <li><a href="../development.html">Development</a></li>
                </ul>
            </li>
        </ul>
        <p class="credit">Grafika by Kosinix - Nico Amarilla</p>
    </div>
    <button id="sidebar-x" class="sidebar-x"></button>
    <div id="handle" class="handle"></div>
</div>    <script src="../js/jquery-2.2.3.min.js"></script>
    <script src="../js/site.js"></script>
</body>